#include <func.h>

int main()
{
    char buf[20]="192.168.120.1";
    struct in_addr addr;
    int ret=inet_aton(buf,&addr);
    printf("addr=%x\n",addr.s_addr);
    printf("百分十进制=%s\n",inet_ntoa(addr));
    printf("addr=%x\n",inet_addr(buf));
    return 0;
}